import pandas as pd
import keras
from keras.models import Sequential
from keras.layers import Dense

ds = pd.read_csv('Data/pima-indians-diabetes.csv',header = None)
X = ds.iloc[:,0:-1].values
Y = ds.iloc[:,-1].values

model = Sequential()
model.add(Dense(12, input_dim = 8, kernel_initializer = 'uniform', activation = 'relu'))
model.add(Dense(8, kernel_initializer = 'uniform',activation = 'relu'))
model.add(Dense(1, kernel_initializer = 'uniform',activation = 'sigmoid'))
model.compile(loss = 'binary_crossentropy', optimizer = 'adam', metrics=['accuracy'])

model.fit(X,Y, epochs = 150, batch_size = 10)

score = model.evaluate(X,Y)

print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))